<template>
  <div class="form-box">
    <div class="form-title">填写企业基础信息</div>
    <div class="form-content-box">
      <el-form
        :model="form"
        label-width="auto"
        style="max-width: 600px; margin: auto"
      >
        <el-form-item label="营业执照">
          <el-upload
            class="upload-demo"
            drag
            action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
            multiple
          >
            <el-icon class="el-icon--upload"><upload-filled /></el-icon>
            <div class="el-upload__text">
              将文件拖拽至此或者 <em>点击上传</em>
            </div>
            <template #tip>
              <div class="el-upload__tip">
                1.照片彩色、清晰、完整；2.有效期大于90天；3.支持JPG、JPEG/PNG格式；4.文件大小不超过20MB
              </div>
            </template>
          </el-upload>
        </el-form-item>
        <el-form-item label="企业类型">
          <el-radio-group v-model="form.resource">
            <el-radio value="1">有限责任公司</el-radio>
            <el-radio value="2">个体工商户</el-radio>
            <el-radio value="3">个人独资企业</el-radio>
            <el-radio value="4">合伙企业</el-radio>
            <el-radio value="5">股份有限公司</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="企业注册地">
          <el-select v-model="form.region" placeholder="请选择企业注册地">
            <el-option label="中国香港" value="1" />
            <el-option label="中国澳门" value="2" />
          </el-select>
        </el-form-item>
        <el-form-item label="注册地址详情">
          <el-input v-model="form.desc" type="textarea" />
        </el-form-item>
        <el-form-item label="注册地邮政编码">
          <el-input v-model="form.name" />
        </el-form-item>
        <el-form-item label="实际经营地址">
          <el-select v-model="form.region" placeholder="请选择实际经营地">
            <el-option label="中国香港" value="1" />
            <el-option label="中国澳门" value="2" />
          </el-select>
        </el-form-item>
        <el-form-item label="实际经营地址详情">
          <el-input v-model="form.desc" type="textarea" />
        </el-form-item>
        <el-form-item label="雇员人数">
          <el-input-number v-model="form.num" :min="1" :max="10" />
        </el-form-item>
        <el-form-item>
            <div class="btn-box">
                <el-button>保存</el-button>
                <el-button type="primary" @click="next">下一步</el-button>
            </div>
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>
<script setup>
import { reactive,defineEmits } from "vue";
const emit=defineEmits();

// do not use same name with ref
const form = reactive({
  name: "",
  region: "",
  date1: "",
  date2: "",
  delivery: false,
  type: [],
  resource: "",
  desc: "",
  num: 0,
});

const next = () => {
  console.log("submit!");
};
</script>
<style lang="less" scoped>
.form-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  .form-title {
    font-family: PingFangSC, PingFang SC;
    font-weight: 500;
    font-size: 1.5rem;
    color: #000000;
    margin: 1.5rem 0;
  }
}
.upload-demo {
  width: 100%;
}
.btn-box{
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 100px;
    box-sizing: border-box;
}
</style>